﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DataTier;
using DataAccessLayer;

namespace BusinessTier
{
    public class BBattery :IBBattery
    {

        public Battery FindAvailableBattery(int stationId, DateTime bookingDateTime)
        {
            return DBBattery.GetAvailableBattery(stationId, bookingDateTime);
        }

        public List<Battery> GetBatteriesInStation(int stationId)
        {
            return DBBattery.GetBatteriesInStation(stationId);
        }


        public void AddBatteryToStation(int stationId)
        {
            DBBattery.AddBatteryToStation(stationId);
        }

        public void LockBattery(int batteryId, bool locked, DateTime lockedUntil)
        {
            DBBattery.LockBattery(batteryId, true, lockedUntil);
        }

        public void BatteryUnlockSweeper(DateTime unlockDate)
        {
            DBBattery.BatteryUnlockSweeper(unlockDate);
        }
    }

}
